public class HF_ClientWSAccountWeb{   
    @future (callout=true)
          public static void AddAccountWebAddress(set<Id> mailset) {
          string outputresult;
          List<Web_Address__c> mailList = new List<Web_Address__c>([select Id,Account_PIMS_Id__c,Web_Address__c,Web_Address_Type_Code__c,Preferred_Flag__c,Description__c from Web_Address__c where ID In: mailset]); 
          WebServiceFinal4.BasicEndpoint s = new WebServiceFinal4.BasicEndpoint();
          for(Web_Address__c mal: mailList){
        
         //Stores Web details in EmailWrapper for Insert
                WebServiceFinal2.EmailWrapper e=new WebServiceFinal2.EmailWrapper();
                e.Comments=mal.Description__c;
                e.DataOn=system.DateTime.Now();
                e.Email=mal.Web_Address__c;
                e.EmailType=mal.Web_Address_Type_Code__c;
                e.NameID=0;   
                e.PartnerContactID=mal.Account_PIMS_Id__c;
                e.PreferredEmail=mal.Preferred_Flag__c;
                e.SfdcEmailID = mal.Id;     
         try
        {
                outputresult=s.AddAccountWebAddress(e);
                system.debug('****'+outputresult);
        }
        catch(Exception ex)
          {
                system.debug('output from webservice: '+ex);       
          }
        }       
} 
    
    @future (callout=true)
  public static void UpdateAccountWebAddress(set<Id> mailset) {
      string outputresult;
      List<Web_Address__c> mailList = new List<Web_Address__c>([select Id,Account_PIMS_Id__c,Web_Address_Type_Code__c,Web_Address__c,Preferred_Flag__c,Description__c from Web_Address__c where ID In: mailset]); 
      WebServiceFinal4.BasicEndpoint s = new WebServiceFinal4.BasicEndpoint();
      for(Web_Address__c mal: mailList){
        
      //Stores Web details in EmailWrapper for Update
            WebServiceFinal2.EmailWrapper e=new WebServiceFinal2.EmailWrapper();
            e.Comments=mal.Description__c;
            e.DataOn=system.DateTime.Now();
            e.Email=mal.Web_Address__c;
            e.EmailType=mal.Web_Address_Type_Code__c;
            e.NameID=0;    
            e.PartnerContactID=mal.Account_PIMS_Id__c;
            e.PreferredEmail=mal.Preferred_Flag__c;
            e.SfdcEmailID = mal.Id;     
             
        try
        {
             outputresult=s.UpdateAccountWebAddress(e);
             system.debug('****'+outputresult);
        }
       catch(Exception ex)
          {
            system.debug('output from webservice: '+ex);       
          }
       }       
    }
}